<script setup lang="ts">
const props: any = defineProps<{
    ujt: any;
    opt: any;
}>();

const { $fn, $global } = props.ujt;

const { setChannelClass } = $fn.useChannel(props);
</script>

<template>
    <template
        v-for="item in Object.entries($global.lang[props.opt.channel].fl)"
        :key="item[0]"
    >
        <slot :item="item" :opt="{ setChannelClass }">
            <div
                :title="item[1] || ''"
                :class="{
                    li: true,
                    cur:
                        item[0] === $global.location.query?.fl ||
                        (item[0] === 'asai' && !$global.location.query?.fl),
                }"
                @pointerdown="setChannelClass(item[0] === 'asai' ? '' : item[0])"
            >
                {{ item[1] }}
            </div>
        </slot>
    </template>
</template>

<style scoped lang="scss"></style>
